<?php
// echo "1111";
print_r($_FILES);
//Array ( [fileName] => Array ( [name] => 112.jpeg [type] => image/jpeg [tmp_name] => W:\WampServer\tmp\phpB48A.tmp [error] => 0 [size] => 39056 ) )
echo "<br>";
// 1.获取上传文件对应的字典
$FileInfo = $_FILES["fileName"];
print_r($FileInfo);
echo "<br>";
//Array ( [name] => 112.jpeg [type] => image/jpeg [tmp_name] => W:\WampServer\tmp\php427E.tmp [error] => 0 [size] => 39056 )
// 2.获取上传文件的名称
$name = $FileInfo["name"];
echo $name; //112.jpeg
echo "<br>";
// 3.获取上传文件保存的临时路径
$path = $FileInfo["tmp_name"];
echo $path; //W:\WampServer\tmp\phpC9D3.tmp

// 4.移动文件
//move_uploaded_file(file,newloc)
//file:	必需。规定要移动的文件。
//newloc:	必需。规定文件的新位置。
move_uploaded_file($path, "./source/" . $name);
